import { post } from '@/utils/request'

// 职位设置 职级
export const jobLevelList = p => post(`/service-org/b/job/v1/jobLevelList`, p, 'get')
// 职位设置 列表
export const getJobList = p => post(`/service-org/b/job/v1/list`, p)
// 职位设置 新增
export const addJob = p => post(`/service-org/b/job/v1/add`, p)
// 职位设置 修改
export const modifyJob = p => post(`/service-org/b/job/v1/modify`, p)
// 职位设置 查看
export const viewJob = p => post(`/service-org/b/job/v1/view/${p.id}`, p, 'get')
// 职位设置 删除
export const delJob = p => post(`/service-org/b/job/v1/del/${p.id}`, p, 'get')
// 职位状态修改
export const changeJobStatus = p => post(`/service-org/b/job/v1/changeStatus/${p.id}/${p.status}`, p, 'get')

// 员工资料设置

// 获取员工字段列表
export const getPageList = p => post(`/service-org/b/extendField/v1/pageList`, p)
// 新增员工自定义字段
export const addExtendField = p => post(`/service-org/b/extendField/v1/add`, p)
// 修改员工自定义字段
export const modifyExtendField = p => post(`/service-org/b/extendField/v1/modify`, p)
// 删除员工自定义字段，固有子弹不能删除
export const delExtendField = p => post(`/service-org/b/extendField/v1/del/${p}`, p, 'get')
// 修改是否必填,是否可修改,是否显示
export const updateExtendFieldStatus = p => post(`/service-org/b/extendField/v1/modify/switch`, p)
// 员工字段信息查看
export const getExtendFieldInfo = p => post(`/service-org/b/extendField/v1/view/${p}`, {}, 'get')

// 职务设置 列表
export const getPositionList = p => post(`/service-org/b/position/v1/listAllAndSub`, p)
// 基于部门id查询职务列表
export const queryPositionByDepartmentId = p => post(`/service-org/b/position/v1/queryByDepartmentId/${p.departmentId}`, p)
// 职务设置 新增
export const addPosition = p => post(`/service-org/b/position/v1/add`, p)
// 职务设置 修改
export const modifyPosition = p => post(`/service-org/b/position/v1/modify`, p)
// 职务设置 查看
export const viewPosition = p => post(`/service-org/b/position/v1/view/${p.id}`, p, 'get')
// 职务设置 删除
export const delPosition = p => post(`/service-org/b/position/v1/del/${p.id}`, p, 'get')
// 职务状态修改
export const changePositionStatus = p => post(`/service-org/b/position/v1/changeStatus/${p.id}/${p.status}`, p, 'get')

